package com.obggtc.picture.enums;

/**
 * AI服务提供商枚举
 * 
 * @author system
 * @date 2025/09/29
 */
public enum AiProviderEnum {
    /**
     * 腾讯混元
     */
    TENCENT_HUNYUAN("tencent", "腾讯混元"),
    
    /**
     * Kimi AI
     */
    KIMI("kimi", "Kimi AI"),
    
    /**
     * 豆包AI
     */
    DOUBAO("doubao", "豆包AI"),
    
    /**
     * 阿里通译
     */
    ALIYUN_TONGYI("aliyun", "阿里通译");
    
    private final String code;
    private final String name;
    
    AiProviderEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }
    
    public String getCode() {
        return code;
    }
    
    public String getName() {
        return name;
    }
    
    /**
     * 根据代码获取枚举
     */
    public static AiProviderEnum fromCode(String code) {
        for (AiProviderEnum provider : values()) {
            if (provider.code.equals(code)) {
                return provider;
            }
        }
        throw new IllegalArgumentException("未知的AI提供商代码: " + code);
    }
}
